namespace BizzCore.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class Messages4 : DbMigration
    {
        public override void Up()
        {
            CreateTable(
                "dbo.RulesMatched",
                c => new
                    {
                        Id = c.Int(nullable: false, identity: true),
                        Rule = c.String(maxLength: 2000),
                        MessageEntity_Id = c.Int(),
                    })
                .PrimaryKey(t => t.Id)
                .ForeignKey("dbo.Messages", t => t.MessageEntity_Id)
                .Index(t => t.MessageEntity_Id);
            
        }
        
        public override void Down()
        {
            DropIndex("dbo.RulesMatched", new[] { "MessageEntity_Id" });
            DropForeignKey("dbo.RulesMatched", "MessageEntity_Id", "dbo.Messages");
            DropTable("dbo.RulesMatched");
        }
    }
}
